package icu.javacg.storage.service;

import icu.javacg.storage.pojo.Environment;
import com.baomidou.mybatisplus.extension.service.IService;
import icu.javacg.storage.pojo.vo.ReturnResult;

import java.util.List;

/**
* @author sky
* @description 针对表【environment(温湿度记录表)】的数据库操作Service
* @createDate 2023-04-25 08:42:44
*/
public interface EnvironmentService extends IService<Environment> {

    /**
     * 通过湿度值获取环境数据
     * @param humidityValue 湿度值
     * @return ReturnResult<List<Environment>>
     */
    ReturnResult<List<Environment>> getEnvironmentByHumidityValue(Double humidityValue);

    /**
     * 通过温度值获取环境数据
     * @param temperatureValue 温度值
     * @return ReturnResult<List<Environment>>
     */
    ReturnResult<List<Environment>> getEnvironmentByTemperatureValue(Double temperatureValue);

    /**
     * 通过条件获取环境数据
     * @param environment 温度湿度记录表实体
     * @return ReturnResult<List<Environment>>
     */
    ReturnResult<List<Environment>> getEnvironmentByCondition(Environment environment);

    ReturnResult<Environment> addEnvironment(Environment environment);
}